package com.example.searchbackend.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.searchbackend.common.typeHandler.GenderTypeHandler;
import lombok.Data;

@Data
@TableName(value = "t_user", autoResultMap = true) // 需要开启自动转换
public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    @TableField(typeHandler = GenderTypeHandler.class)
    private GenderEnum gender;
}
